home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / freeware / pixeltoolbox / Setup.exe / Main / PixelToolbox.exe / PixelToolbox.dxr / Scripts_97_hotspot blinker.ls < prev    next >
Encoding:
Text File  |  2002-06-08  |  552 b   |  33 lines

  1. property pMySprite, pState, pBlinkerTime
  2.  
  3. on beginSprite me
  4.   pMySprite = sprite(me.spriteNum)
  5.   pState = 0
  6. end
  7.  
  8. on hotspotOn me
  9.   pMySprite.blend = 100
  10.   pState = 1
  11.   pBlinkerTime = the milliSeconds
  12. end
  13.  
  14. on hotspotOff me
  15.   pMySprite.blend = 0
  16.   pState = 0
  17. end
  18.  
  19. on exitFrame me
  20.   if pState then
  21.     if the milliSeconds < (pBlinkerTime + 750) then
  22.       nothing()
  23.     else
  24.       if pMySprite.blend = 100 then
  25.         pMySprite.blend = 0
  26.       else
  27.         pMySprite.blend = 100
  28.       end if
  29.       pBlinkerTime = the milliSeconds
  30.     end if
  31.   end if
  32. end
  33.